<!-- templates/admin/user/add_user.html -->
<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>新增客户</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container mt-5">
    <div class="card shadow-sm">
        <div class="card-header bg-primary text-white">
            <h4>新增客户</h4>
        </div>
        <div class="card-body">
            <form th:action="@{/admin/user/add}" th:object="${customer}" method="post">
                <div class="mb-3">
                    <label for="customerName" class="form-label">客户姓名</label>
                    <input type="text" th:field="*{name}" class="form-control" placeholder="请输入客户姓名" required>
                </div>
                <div class="mb-3">
                    <label for="PID" class="form-label">身份证号</label>
                    <input type="text" th:field="*{pid}" class="form-control" placeholder="请输入身份证号" required>
                </div>
                <div class="mb-3">
                    <label for="telephone" class="form-label">联系电话</label>
                    <input type="text" th:field="*{telephone}" class="form-control" placeholder="请输入联系电话" required>
                </div>
                <div class="mb-3">
                    <label for="address" class="form-label">联系地址</label>
                    <input type="text" th:field="*{address}" class="form-control" placeholder="请输入联系地址" required>
                </div>
                <div class="mb-3">
                    <label for="username" class="form-label">账号</label>
                    <input type="text" th:field="*{username}" class="form-control" placeholder="请输入账号" required>
                </div>
                <div class="mb-3">
                    <label for="password" class="form-label">密码</label>
                    <input type="password" th:field="*{password}" class="form-control" placeholder="请输入密码" required>
                </div>
                <div class="mb-3">
                    <label for="role" class="form-label">角色</label>
                    <select th:field="*{role}" class="form-select" required>
                        <option value="">请选择角色</option>
                        <option value="ADMIN">管理员</option>
                        <option value="CUSTOMER">客户</option>
                    </select>
                </div>
                <button type="submit" class="btn btn-success">提交</button>
                <a th:href="@{/admin/customer}" class="btn btn-secondary">取消</a >
            </form>
        </div>
    </div>
</div>
</body>
</html>